<script type="text/javascript" src="${basePath}/js/tds-osuserbucket.js"></script>
 <script type="text/javascript">
	$(document).ready(function(){
		User.showQuota();
	});
</script>


<div class="row main_right_content"><!-- <input id="n" name="userId"  value="" /> -->
	
    <a id="removeHostBtn" class="btn btn-default" href="javascript:void(0);"
    		onclick="User.addCaps();">权限管理</a>
   	
    <a id="removeHostBtn" class="btn btn-default" href="javascript:void(0);"
    		onclick="User.quota();">配额管理</a>
    <a id="removeHostBtn" class="btn btn-default" href="javascript:void(0);"
    		onclick="User.modifyMaxBuckets();">基础设置</a>	
   	
	<form id="form" action="${basePath}/os/user/list" method="get">
		<div id="usersList"><table class="table table-striped table-hover">
	<thead>
		<tr>
			<th width="3%" scope="col"><input
				id="checkAllUsers" name="" type="checkbox" value="" /></th>
			<th width="10%" scope="col">用户名</th>
		    <th width="5%" scope="col">邮箱</th> 
			<th width="10%" scope="col">挂起</th>
			<th width="15%" scope="col">最大桶数量</th>
			<th width="10%" scope="col">配额</th>
			<!-- <th width="22%" scope="col">配额</th> -->
			<th width="15%" scope="col">权限</th>
			<!-- <th width="33%" scope="col"><@spring.message code='host.createTime'/></th>
		 -->
		    <th width="22%" scope="col">操作桶</th>
		    <!-- <th width="22%" scope="col">操作权限</th> -->
		 </tr>
	</thead>
	<tbody>
		<#list users as item>
		<tr <#if ((item_index+1) % 2 == 0) >class="oddrow"</#if>>
			<td class="c"><input name="userId" type="checkbox" value="${item.id}" /></td>
	        <td>${item.displayName!}</td>
	         <td>${item.email!}</td> 
	        <td><#if item.suspended==false>否<#else>是</#if></td>
	        <td>${item.maxBuckets!}</td>
	        <td name="quota" id="${item.id}"></td>
	       <!--  <td>${item.suspended!}</td> -->
	        <td><#list item.caps as item2>type:${item2.type!}&nbsp;&nbsp;perm:${item2.perm!}<br></#list></td>
	       <td>
	        	<a href="javascript:void(0);" onclick="User.showAvailableBucket(this);">分配桶</a>
	        	<a href="javascript:void(0);" onclick="User.showUserBucket(this);">移除桶</a>
	        </td>
	        <!-- <td>
	        	<a href="javascript:void(0);" onclick="User.showAvailableCaps(this);">设置权限</a>
	        	<a href="javascript:void(0);" onclick="User.showUserCaps(this);">取消权限</a>
	        </td> -->
	    </tr>
		</#list>
	</tbody>
</table></div>
		
	</form>
	<div id="editHostDialog"></div>
	<div id="createPoolDialog"></div>
	<div id="modifyPoolDialog"></div>
</div>
<script type="text/javascript">
$("#checkAllUsers").checkall({itemName : "userId"});
 /* $(document).ready(function(){         
	  $('#form').ajaxpager({
			target : '#usersList'
		});
}); */ 
</script>